<?php
/**
 *
 * @author liuchao
 */
require_once BaseUtil::getModulePath("base") . '/models/BaseDao.php';

class SpecialNameDao extends BaseDao {

    protected $_name;

    public function  _setup() {
        $this->_name = $this->prefix() . "special_sales";
        parent::_setup();
    }

    public function updateSpecialNamePromotion($data,$id){
        $where = $this->db_w->quoteInto('id = ?', $id);
        $this->update($data,$where);
    }
    
    public function getAllSpecialSales()
    {
    	$select = $this->db_r->select();
        $select->from($this->_name,"*");
        $select->where('is_delete = 0');
        $select->order('id desc');
        $sql = $select->__toString();
        $result = $this->db_r->fetchAll($sql);
        return $result;
    }
}